//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * packageinfoServiceImpl
 * 项目名称:代购系统
 *
 * @author Mengxiangliang
 *
 * 功能描述:
 * 
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * 
 */
 
package com.gamutsoft.amb.packageinfo.service.impl;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.service.impl.GenericServiceImpl;
import com.gamutsoft.amb.packageinfo.dao.IPackageinfoDao;
import com.gamutsoft.amb.packageinfo.model.Packageinfo;
import com.gamutsoft.amb.packageinfo.service.IPackageinfoService;

public class PackageinfoServiceImpl extends GenericServiceImpl<Packageinfo, Long> implements IPackageinfoService {
	public IPackageinfoDao packageinfoDao;

    public PackageinfoServiceImpl(IPackageinfoDao packageinfoDao) {
		super(packageinfoDao);
		this.packageinfoDao = packageinfoDao;
	}
	
	/**
	 * 根据条件查询记录
	 * @author Mengxiangliang
	 * @param  QueryExample
	 * @return PackageinfoList
	 * @throws BusinessException
	 */
	public List<Map> searchPackageinfoList(QueryExample qe) throws BusinessException{
	  
	   return packageinfoDao.searchPackageinfoList(qe);
	   
	}
	
	/**
	 * 根据ID查询记录
	 * @author Mengxiangliang
	 * @param Long id
	 * @return domain
	 * @throws BusinessException
	 */
	public Packageinfo searchPackageinfoById(Long id) throws BusinessException{
	  
	   return packageinfoDao.searchPackageinfoById(id);
	   
	}

	/**
	 *  删除记录
	 * @author Mengxiangliang	 
	 * @param id
	 * @throws BusinessException
	 */
	public void deletePackageinfoById(Long id) throws BusinessException{
	 
	  packageinfoDao.deletePackageinfoById(id);
	  
	}
	
	/**
	 * 修改记录
	 * @author Mengxiangliang
	 * @param domain
	 * @throws BusinessException
	 */
	public void updatePackageinfo(Packageinfo domain) throws BusinessException{
	
	   packageinfoDao.save(domain);
	   
	}

	/**
	 * 新增记录
	 * @author Mengxiangliang
	 * @param domain
	 * @return
	 * @throws BusinessException
	 */
	public void createPackageinfo(Packageinfo domain) throws BusinessException{
	
	   packageinfoDao.save(domain);
	}

	@Override
	public List<Map> searchPackageinfoListByWhere(QueryExample qe,
			Packageinfo domain) throws BusinessException {
		return packageinfoDao.searchPackageinfoListByWhere(qe, domain);
	}

	@Override
	public List<Map> staticPackageinfo(QueryExample qe, Packageinfo domain)
			throws BusinessException {
		// TODO Auto-generated method stub
		return packageinfoDao.staticPackageinfo(qe, domain);
	}
	

}